<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::prefix('fw')->group(function (){
    Route::get('/sendSms', [\App\Http\Controllers\api\login\LoginController::class, 'sendSms']);
    Route::get('/login', [\App\Http\Controllers\api\login\LoginController::class, 'login']);
    Route::get('/wxLogin', [\App\Http\Controllers\api\login\LoginController::class, 'wxLogin']);
    Route::get('/index', [\App\Http\Controllers\api\pay\PayController::class, 'index']);
    Route::get('/return', [\App\Http\Controllers\api\pay\PayController::class, 'return']);
    Route::any('/notify', [\App\Http\Controllers\api\pay\PayController::class, 'notify']);
    Route::any('/getCode', [\App\Http\Controllers\api\pay\PayController::class, 'getCode']);
});

